<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// [ 应用入口文件 ]
header('content-type:application:json;charset=utf8');  
header('Access-Control-Allow-Origin:*');  
header('Access-Control-Allow-Methods:POST');  
header('Access-Control-Allow-Credentials:true');
header('Access-Control-Allow-Headers:x-requested-with,content-type');  
if(strtoupper($_SERVER['REQUEST_METHOD']) == 'OPTIONS'){
    exit;
}

if (extension_loaded('zlib')){
    ob_end_clean();
    ob_start('ob_gzhandler');
}

// 定义应用目录
define('APP_PATH', __DIR__ . '/../application/');
define('PUBLIC_PATH', __DIR__ );

// 加载框架引导文件
require __DIR__ . '/../thinkphp/start.php';
